<template>
    <fieldset>
        <legend>父组件</legend>
        <childCom :gift="gift" @betMoney="handleBet"></childCom>
        <h1>{{ gift }}</h1>
        <h2>下单金额：{{ money }}</h2>
        <button @click="handleClick">点击修改gift</button>
    </fieldset>
</template>
<script setup>
import childCom from "./Child.vue"
import { ref } from "vue"
let gift = ref('初始值')
let handleClick = () => {
    gift.value = 'aaa'
}
let money = ref(0)

let handleBet = (input) => {
    console.log(input);
    money.value = input
}
</script>